package com.yonyou.pmclouds.discuss.entity;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@Setter
@Getter
@Table(name = "pm_discussion")
public class DiscussionVO extends SuperVO {
    public static final String CREATOR = "creator";
    public static final String CREATOR_NAME = "creatorName";
    public static final String REPLIED_USER = "repliedUser";
    public static final String REPLIED_USER_NAME = "repliedUserName";
    @Id
    private String pkDiscuss;
    private String pkTenant;
    @NotNull
    private String relateKey;
    @NotNull
    private String relateType;
    @Size(max = 1300)
    @NotNull
    private String content;
    private String creator;
    /**
     * 回复的评论
     */
    private String repliedDiscuss;
    /**
     * 被回复的用户
     */
    private String repliedUser;
    @Transient
    private String repliedUserName;

    @Transient
    private String creatorName;
    private Date creationtime;

    @Transient
    private DiscussionVO[] replies;
}
